package com.ai.test3.service;

import com.ai.test3.dao.EOrderMapper;
import com.ai.test3.model.EOrder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Date;

/**
 * Date:  2018/11/6
 * Time:  15:44
 * Email: siy@hmgsoft.com
 * Created by siy
 */
@Service
public class OrderServiceImpl implements OrderService {

	@Resource
	private EOrderMapper eOrderMapper;

	@Transactional
	@Override
	public String buySth(Integer userId,Long money) {
		EOrder eOrder = new EOrder();
		eOrder.setUserId(userId);
		eOrder.setMoney(money);
		eOrder.setCreateTime(new Date());
		eOrderMapper.insertSelective(eOrder);

		


		return null;
	}
}
